Day 2 & Day 3
- supriyamalla
- Oct 2, 2020
- 1 min read
Hi, it was a long day today. Not very pumped up today but I will still try.
So, learning today - Booleans!
Booleans isn't just about returning True, False (honestly I didn't realize the varied applications of booleans until completing the exercise on that!)
next up, Tuples and list.
Learnt the following:
Lists and Tuples are same except tuples are immutable and List is mutable
List use [] and tuples ()
List functions:
append
pop
in, for ex: "earth" in planets (will return true/false)
list.index('earth') (will return the position of the element)
.as_integer_ratio()
try, except (learnt this in the exercise problem) - See useful link
Loops, List comprehension:
For, while
Range
List comprehensions
Cool, completed 2 days in a row! :)
Finally, done.
See you tomorrow!
Comentarios