hairinmybellybutt@lemmy.world to Programmer Humor@lemmy.mlEnglish · 1 year agowould you write web app with this?lemmy.worldimagemessage-square7fedilinkarrow-up10arrow-down10
arrow-up10arrow-down1imagewould you write web app with this?lemmy.worldhairinmybellybutt@lemmy.world to Programmer Humor@lemmy.mlEnglish · 1 year agomessage-square7fedilink
minus-squaretryptaminev 🇵🇸 🇺🇦 🇪🇺@feddit.delinkfedilinkarrow-up0·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: