Splitting a string into list items

The split method splits the string into a bunch of strings grouped together in a list.


name = "abdur rehman"
name = name.split(" ")
print(name)

Result:
['abdur', 'rehman']




Comments

Popular posts from this blog

Loading Windows in CLI mode

XHR/fetch Breakpoints Explained

What is the difference between iostream and iostream.h in cpp?