List is a datatype in Python which can be print as a list of comma-isolated values between square brackets. Advantage of using a list is that list items need not be of the same type. Creating a list is as
Read more
[metaslider id="213"]
List is a datatype in Python which can be print as a list of comma-isolated values between square brackets. Advantage of using a list is that list items need not be of the same type. Creating a list is as
Read moreRange method returns values between start and stop, increasing by the value of step (defaults to 1)… range(start, stop, step) >>> for i in range (0, 10): … print(i) File “<stdin>”, line 2 print(i) ^ IndentationError: expected an indented block
Read moreStr.capitalize() returns a copy of the string containing first character capitalized and the rest in lowercased x = “hello” x.capitalize() Output: Hello Str.lower() returns a string in which all characters are in lowercased x = “HELLO” x.lower() Output: hello Str.upper() returns
Read moreYou can download python from https://www.python.org/downloads/ don’t forget to mention python path in environment variables. You can also install Anaconda and work on Ipython or Jypyter https://www.anaconda.com/download So after installation in your terminal, you can simply run the command: python
Read more