Python Questions
5.34K subscribers
1 photo
7 links
Tasks for Beginners, Interview Questions, Regular expressions, simple coding problems, Quiz etc.

Useful Resources — »»» @python_resources_iGnani
Projects for Practice — »»» @python_projects_repository
Discussion Forum — »»» @python_programmers_club
Download Telegram
#answer to the question 👆is ————-»»» class float

Since the result of 1/2 is 0.5, which is a float.

65% got it correct.
#answer to the question 👆is ————-»»» b) hello world!

the keyword argument sep by default is set to a single space " ", hence it add's a space inbetween the two words.

50% have answered it correct.
#answer to the question 👆is ————-»»» Dict

Q: Which is faster in performance while searching around a million records plus?

To clarify, both Set and Dict perform search quite fast due to both Set & Dict being implemented using hashtables.
However, Dict performs marginally better compared to Set, but when compared to List or tuple, the difference is huge.