Posts

Python bootcamp Day002

Python_bootcamp Day 002 ¶ Data Types ¶ Strings ¶ From Day 001 we learned that strinds are declere with " or ' just like "Hello world". Now we can think of this string as a chain where every character is an individual entity and all of them are link together, this means that any character within a string is adressable by using an index. For example: print("Hello"[0]) will print an H because it is the first character In [1]: print ( "Hello" [ 0 ]) print ( "Hello" [ 1 ]) print ( "Hello" [ 4 ]) H e o Integer ¶ This are numbre, without any decimals. Unlike strings there is no need to add declaration, just type the numbers. To make the code human readable large number can be "separated " by underscore such as 1,500=1_500 and 1,000,000,000 = 1_000_000_000 In [2]: print ( 1