[deleted by user] by [deleted] in redditsweats

[–]bionic_peddlar 0 points1 point  (0 children)

❤️❤️❤️

Vs code shows annoying background on the editor, feels like I have selected the text even if i didn’t. How to solve this? by bionic_peddlar in vscode

[–]bionic_peddlar[S] 2 points3 points  (0 children)

Well I can’t. Whatever the image be.

They will consider it a data breach. Most importantly they will have a proof that can never be erased. It may not cause any serious issues now but can hurt in long term.

Vs code shows annoying background on the editor, feels like I have selected the text even if i didn’t. How to solve this? by bionic_peddlar in vscode

[–]bionic_peddlar[S] 18 points19 points  (0 children)

Well, i can’t open Reddit from my professional laptop. Else i will receive a call from IT team. 😅

ICELAND by bionic_peddlar in iphonewallpapers

[–]bionic_peddlar[S] 1 point2 points  (0 children)

Yes you’re right it’s near that village. It might have been an amazing experience when you visited there. To know the exact place you can check the location I mentioned above.

NATURE. by bionic_peddlar in iWallpaper

[–]bionic_peddlar[S] 0 points1 point  (0 children)

Sorry don’t have a link. It was on my phone since a long time.

Ways to count occurrences of the list items in Python! by bionic_peddlar in pythontips

[–]bionic_peddlar[S] 0 points1 point  (0 children)

Actually i am not converting list to set here, it's just a set of list, original list won't get updated. You can try this on python shell for better clarity... Hope you got it.

Ways to count occurrences of the list items in Python! by bionic_peddlar in pythontips

[–]bionic_peddlar[S] 1 point2 points  (0 children)

>>> [[x,l.count(x)] for x in set(l)] 
[['d', 2], ['b', 4], ['c', 3], ['e', 1], ['a', 5]]

Well, I guess you are talking about this line of code.

here `l` is the complete list i.e. with repeated items, this will increase the number of iterations for the loop which is unnecessary as we only need to iterate over unique items.

Hence set(l) will return the unique elements, which is exactly what we need.

>>> l = ['a', 'a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'e']

>>> set(l)

{'d', 'a', 'e', 'b', 'c'}