+ 11
Why int(str(i)) had this big impact on location of int variable in memory⁉️🤔
I read in 🐍 doc that 🐍 in order to optimize memory, int variables in the range(-5, 256+1) stores in the same place. Observe the beginning & the end of the range. What role does int(str(i)) play? This operation is somewhat artificial because "i" is integer type. Kuba Siekierzyński BroFarOps 👑 🌟Prometheus 🇸🇬 John Wells David Carroll https://code.sololearn.com/c3usQsVh785Y/?ref=app
2 Antworten
+ 1
this article actually does a fairly good explanation as it tosses int(str(I)) around changing locations in the memory
https://medium.com/@birnbera/objects-memory-and-mutation-in-JUMP_LINK__&&__python__&&__JUMP_LINK-810bf090b63c
stackoverflow also has a very good explanation of why you would use this methodology
https://stackoverflow.com/a/28864111/7218253
+ 11
BroFarOps 👑 Thanks a lot for the links. Medium article is really very interesting ‼️☺️
https://code.sololearn.com/che8Hyz22KLz/?ref=app