Wie mache ich jetzt aus display_byte einen Float (fließkommazahl)
Ich möchte ja natürlich das die kilobyte mit komma angezeigt werden.
Danke ihr würdet mir sehr helfen
Code: Alles auswählen
print """
Welcome to txtcounter \n
Make sure that you switched to the directory where your txt file is saved"""
txt_to_count = input(str("Drag a txt file in here:"))
a = open(txt_to_count , "r")
x = a.read()
print len(x) , "letters"
display_byte = len(x) * 1024
print display_byte