DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

NatΓ‘lia Catunda
NatΓ‘lia Catunda

Posted on

bye, element...

Remove in a randomic way any array elemet.

List=["baby","computer","mouse","car","nootebook"]
print(List.pop())
print(List)
Enter fullscreen mode Exit fullscreen mode

and if you want... remove a specific element you can print them
Like:

list=["books","store","location"]
print(list.pop(2))
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

🌚 Life is too short to browse without dark mode