Hier mein Code:
Code: Alles auswählen
umwandel_1 = "4534" # string
print type(umwandel_1)
int(umwandel_1)
print type(umwandel_1)
'''
>>> <type 'str'>
>>> <type 'str'>
'''
Code: Alles auswählen
umwandel_1 = "4534" # string
print type(umwandel_1)
int(umwandel_1)
print type(umwandel_1)
'''
>>> <type 'str'>
>>> <type 'str'>
'''
Code: Alles auswählen
'''
Created on 24.05.2010
@author: Sebastian
'''
zahl = 23
if type(zahl) is int:
print "Es ist eine Zahl"
else:
print "Ein String !"
Wo ist die ?Das kannst du dir leicht selbst beantworten.
Lies dir in der Doku zur Standard-Lib einfach durch, was insert() macht. Dann kennst du die Antwort.