top of page

Python and Types

  • Writer: Jino Shaji
    Jino Shaji
  • Jan 7, 2015
  • 1 min read

Updated: Jun 9, 2020


Python determines the data types in a program automatically.  “Dynamic Typing”

But Python’s not casual about types, it enforces them after it figures them out.      “Strong Typing”.

So, for example, you can’t just append an integer to a string.  You must first convert the integer to a string itself. 

 x = “the answer is ”  # Decides x is string.

 y = 23                # Decides y is integer.

print x + y   # Python will complain about this.

Recent Posts

See All
Program to Create an investment report.

“””Program: investment.py Author: JINO SHAJI Compute an investment report. 1. The inputs are        starting investment amount       ...

 
 
 

Comments


bottom of page