Advertising
Hey guys. I've recently started learning Python from a book, and using the tutorials on this site, but I'm kind of curious about a few things. From the information I've read, I can't quite get a clear answer;I understand Tuples to be a form of list that isn't modifiable in the same way that a list is (i.e removing or adding items), so what would be the benefit of using them? Surely using a list would be more beneficial most of the time as they can be modified to suit whatever purpose at the time? I also read about turning integers into strings, what would the point of this be when you could easier create a string and keep them separate?
Also, when creating a for loop, would I be correct in assuming that you set the variable during the line of code, so it could be anything at all? for example:
- Code: Select all
for variable_possibly in example_list:
print:(variable_possibly)
Sorry if my questions are ridiculous, but I've only been learning for about a week, so I'm incredibly green. Cheers for your time.
Edit: There may be more questions as I continue learning.
Edit2: I've done my research and found my answers. Though, I still may ask other questions in future.


