PyroProgramming
HomeDocsTutorials

Python Tutorial

Python HomePython IntroPython Get StartedPython SyntaxPython CommentsPython VariablesPython Data TypesPython NumbersPython CastingPython StringsPython BooleansPython OperatorsPython ListsPython TuplesPython SetsPython DictionariesPython If...ElsePython While LoopsPython For LoopsPython Functions

Python Casting

Type Casting

Convert between data types using built-in functions like int(), float(), and str().

Examples

x = "10"
print(int(x) + 5)   # 15

y = 3.14
print(str(y))       # "3.14"
PreviousNext

© 2025 PyroProgramming. All rights reserved.

Created by EZ123.