[Python-de] f-string Formatanweisung
ruppert at hs-worms.de
ruppert at hs-worms.de
Mo Jun 22 09:28:36 EDT 2020
Andreas B. <ab at sysing.de> wrote:
> Am 22.06.2020 um 12:36 schrieb ruppert at hs-worms.de:
>> das unten befindliche Programm funktioniert mit f-String-Formatierung
>> nicht so, wie ich das erwarte. Wenn ich das F-String-Format, das ich
>> haben möchte, zuerst als Striing formatiere (s), sieht es richtig aus.
>>
>> Aber bei print(s) wird nicht das in s steckende f-string-Format
>> interpretiert, sonde
>
> ...
>
>> #!/usr/bin/python3
>> import sys
>> if(len(sys.argv)<2):
> ...
>
> Ähm, welches /usr/bin/python3? die F-Strings gibt es erst seit Python
> 3.6. Läuft da vielleicht ein älteres Dreier-Python?
python 3.7.3 aus debian stable
>
> Grüße,
> A.B.
>
Grüße M.Ruppert
--
ruppert at hs-worms.de
Mehr Informationen über die Mailingliste python-de