Although variables in Python are not declared or defined by specifying their datatype. In python a variable automatically sets its datatype based on the first value saved in it. But it's very important to know how to convert one datatype into another. Here, we will learn how to convert
String datatype into
Float datatype and vice versa.
Try changing the line 16 to
numAdd = numInt + numStr, you will get an error, because
numStr is a string. Click the button, to Run the code again.
;to join two Executable Statements
/to break code into multiline code
zipfunction to iterate over two Lists
What is Studytonight?
Made with by Abhishek Ahlawat
© 2019 Studytonight. All rights reserved.