Python what is data type ? to declaring of a variable is called data type another words to declare the data what type of the data it is ! data types ? Text Type: str Numeric Types: int , float , complex Sequence Types: list , tuple , range Mapping Type: dict Set Types: set , frozenset Boolean Type: bool Binary Types: bytes , bytearray , memoryview None Type: NoneType more CODE FOR LIST SLICING: ------------ word=input('what is word?:') print(word[1::2]) ------ input: rhaajrui output :HARI --------------- where 1=index of word 2= after second letter will be print at everytime SECOND ONE word='rhaajrui' print(word[1::2]) output:hari CODE FOR REVERSING OF A STRING: ---------------- word=input('what is word?:') print(word[::-1])...
Comments
Post a Comment