=> The item at a certain index in a list can be reassigned
=> Lists and String are similar in many ways => Strings can be thought of as lists of characters that can't be changed
=> Lists can be added and multiplied in the same way as strings
nums = [1,2,3]
print (nums + [4,5,6])
print (nums *3)
in operator
=> to check it an item is in the list
=> determine whether or not a string is a substring of another string
not opeartor
=> to check it an item is not in the list
No comments:
Post a Comment