A Hundred Days of Code, Day 008 - Python Basics, Lists, Tuples, Dictionaries, Sets and Done!

This was an amazing run! Learnt lots. Done with the basics course. Woohoo! Notes With lists Not pythonic to mix types can iterate, slice and dice, search, get lengths, transmute them (for e.g. reverse items in them) just like strings can have lists of lists! lists are mutable, unlike strings. can change items/elements of a list If i create a list from another list, the new list items reference the old list items if i want to copy elements from a list rather than reference them, I’ll go newlist = oldlist[:] which will copy the elements from the old list into the new one, rather than create references to the old ones Realise that there is a difference between changing the values of a variable and between changing elements of a list....

July 15, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 007 - Python Basics, Variables, Basic Data Types, Strings and Loops

Started with the Reuven Lerner, Intro Python:Fundamentals course today. Made surprising headway, even though today was crazily demanding with work and personal stuff. Notes The difference between == and is If you want to see if two things are equal, use == like, is 2+2 == 4 If you want to know if two objects are the same thing. if they are just pointers to the same memory location, use is....

July 14, 2020 · Mario Jason Braganza