can any expert explain the code ‘for i in file: name=I[:-4]’ mean?
I am trying to understand the code as follow:(the propose is to sort the list by scores)
file=['Leo102\n','Alex383\n','evelyn570\n','John275\n']
for i in file:
name=i[:-4]
score=int(I[-4:-1])
from Recent Questions - Stack Overflow https://ift.tt/2NzaOrD
https://ift.tt/eA8V8J
Comments
Post a Comment