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

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 966,155 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
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)

Update Your DEV Experience Level:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›