+ 1

Why are F-Strings not working on sololearn? (Python)

f"text" output: 'text' tier = "Papagei" zahl = 1 f"{zahl} {tier} ist mausetot!" output: '1 Papagei ist mausetot!' i learnt it from Dr. Rene Brunner

16th Dec 2021, 4:18 PM
Nico Zaglmayr
9 ответов
+ 2
Nico Zaglmayr Look, I understand but i think Sololearn doesn't work like a Jupyter notebook. In Jupyter notebook the print is like if is implied. https://stackoverflow.com/questions/58895060/in-JUMP_LINK__&&__python__&&__JUMP_LINK-what-is-it-called-when-you-see-the-output-of-a-variable-without-printi
16th Dec 2021, 4:57 PM
Anya
Anya - avatar
+ 1
they do, what code did you try?
16th Dec 2021, 4:25 PM
Slick
Slick - avatar
+ 1
Noting will print if you don't print it...
16th Dec 2021, 4:37 PM
Angelo
Angelo - avatar
+ 1
Nico Zaglmayr , if I'm not crazy, string will work withouth print if you use direct in console. You need to use print in Sololearn.
16th Dec 2021, 4:40 PM
Anya
Anya - avatar
+ 1
https://ibb.co/3cZ01Jz i made a screenshot of my jupiter notebook
16th Dec 2021, 4:44 PM
Nico Zaglmayr
+ 1
ok i understand:) i thought thats the new short way of print. thank you, have a nice day
16th Dec 2021, 5:03 PM
Nico Zaglmayr
16th Dec 2021, 4:32 PM
Nico Zaglmayr
0
كييكييحطحي
18th Dec 2021, 2:50 PM
Aso Rauf
Aso Rauf - avatar