python change type of variable code example Example: change variable type python x = 12 str(x) #it's a String now number = "24" int(number) #it's an integer now