hairinmybellybutt@lemmy.world to Programmer Humor@lemmy.mlEnglish · 1 year agowould you write web app with this?lemmy.worldimagemessage-square43fedilinkarrow-up1217arrow-down120
arrow-up1197arrow-down1imagewould you write web app with this?lemmy.worldhairinmybellybutt@lemmy.world to Programmer Humor@lemmy.mlEnglish · 1 year agomessage-square43fedilink
minus-squaretryptaminev 🇵🇸 🇺🇦 🇪🇺@feddit.delinkfedilinkarrow-up3·1 year agoexample: i = 5.0//2 list[i] throws an error because i is double and the list-index expects an integer. so for it to work the code needs to look like this: i = int(5.0//2) list[i] meanwhile this works: i=5 i= ‘abcde’
example:
throws an error because i is double and the list-index expects an integer.
so for it to work the code needs to look like this:
meanwhile this works: