I'm working with text files and I need this:

Viewed 37

I have string list like this:

list1=[354 26 23.02.2013 01:31:24]

list1[0]=3

I need:

list1[0]=354
1 Answers

I assume you are trying to split your string at the whitespaces. Try the following:

splitted_list='354 26 23.02.2013 01:31:24'.split(' ')
print(splitted_list[0]) //Outputs 354
Related