![]() |
|
help please - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Python (https://sinister.ly/Forum-Python) +--- Thread: help please (/Thread-help-please--48936) Pages:
1
2
|
RE: help please - H4R0015K - 04-16-2013 Lets see what happens when you enter a string : Code: data = "creed welcome to hackcommunity".split()[::-1] ("creed welcome to hackcommunity" is the string which we entered)
data = ['creed','welcome','to','hackcommunity'][::-1] (split() method splits that string and store the result has a list)
data = ['hackcommunity','to','welcome','creed'] ([::-1] reverse that list)RE: help please - H4R0015K - 04-16-2013 Lets see what happens when you enter a string : Code: data = "creed welcome to hackcommunity".split()[::-1] ("creed welcome to hackcommunity" is the string which we entered)
data = ['creed','welcome','to','hackcommunity'][::-1] (split() method splits that string and store the result has a list)
data = ['hackcommunity','to','welcome','creed'] ([::-1] reverse that list)RE: help please - Creed_mybb_import11544 - 04-16-2013 thanks a lot @Deque and @H4R0015K ... i have understood ... RE: help please - Creed_mybb_import11544 - 04-16-2013 thanks a lot @Deque and @H4R0015K ... i have understood ... |