Difference between revisions of "Casting"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 +
https://www.w3schools.com/python/python_casting.asp
 +
 
There may be times when you want to specify a type on to a variable. This can be done with casting.
 
There may be times when you want to specify a type on to a variable. This can be done with casting.
 +
 +
=== Example ===
  
 
  x = str(3)    # x will be '3'
 
  x = str(3)    # x will be '3'

Revision as of 03:35, 3 March 2022

Advertising: