Space saving in Python 3............ | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Space saving in Python 3............

Can anyone please tell me which will accumulate less space......... 1) string('hi \n please help') Or 2) string(""'hi please help""")

17th Aug 2020, 12:14 PM
ANDY тŠ½Ń” CODER [RECODE]
ANDY тŠ½Ń” CODER [RECODE] - avatar
3 Respostas
+ 4
like file size ? 2nd one need 4 extra double quote, plus (depend on your editor) in windows new line resolve using 2 character \n\r. thats 1 more character. that's extra 5bytes for you.. out of at least 500Gigabytes of your harddrive ĀÆ\_(惄)_/ĀÆ
17th Aug 2020, 12:28 PM
Taste
Taste - avatar
+ 3
That's hardly going to matter while making anything.
17th Aug 2020, 12:19 PM
Arsenic
Arsenic - avatar
+ 2
Arsenic but using many times could make the program slow while loading
17th Aug 2020, 12:26 PM
ANDY тŠ½Ń” CODER [RECODE]
ANDY тŠ½Ń” CODER [RECODE] - avatar