DEV Community

Nati Thinks Tech
Nati Thinks Tech

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)