I've created a very small Python code to output the sum of two input numbers.. can it be made smaller?? ๐ค
Hi folks.. ๐! This one is my first shared code in the app! I'm a pretty new user with the app and just learning many things here.. ๐! These bit-sized lessons are really helping me to learn things in a nice and much easier way with much comfort! I'm focusing mainly on Python, JS, Web stuffs (HTML, CSS).. But want to learn many other things too.. ๐! Here, this is a very little piece of code which I wrote while solving a coding qs in a 'Python Core' lesson which introduced to me the 'Walrus' operator which is :=. I was familiar with few langs but never knew abt this kinda weird looking operator..๐ ! Here I just tried to make a code to print the sum of two input numbers just within a line.. I think this is the shortest program I've ever written to output the sum of 2 inputs in any lang.. ๐! Share any thought abt it..! And is it possible to make this code any shorter doing the same task..? ๐ค FYI, the code is here: print(x:=int(input())+int(input())) https://code.sololearn.com/c5tHPnF2Xrf1/?ref=app