Coding Lesson (27-31 January)
MONDAY Continue learning Python on Kaggle. Changing Lists Lists are "mutable". You can modify your lists "in place". For example, I want to change the name of the locker owner. Well, Lkhagvasuren is a really hard name to type (I don't know why I choose that name at the first place). So, I'm going to change it. lockers[6] = 'Amogus' lockers ['Emily', 'John', 'Adam', 'Alicia', 'Eve', 'Zack', 'Amogus'] That's easier to read. We also can change two and more. Not just one. For example: lockers[:3] = ['Aidan', 'Raito', 'Yelena'] print(lockers) ['Aidan', 'Raito', 'Yelena', 'Alicia', 'Eve', 'Zack', 'Amogus'] List functions Python has several useful functions for working with lists, like len , sorted , sum , min and max . Example for 'len': len(lockers) # Output: 7 Example for 'sorted': sorted(lockers) #...