• Archives
  • All Categories
  • All Tags

tuple

1 article

bash comment database date datetime deluser df dictionary directory disk dmesg du file for host ip kernel len linux list log mkdir mysql nano network ping postgresql python rm rmdir route sed text editor time timestamp tmux traceroute tuple user userdel vim while
How to append elements in Python tuple?

How to append elements in Python tuple?

Monday, Aug 5, 2024

Tuples are used to store multiple elements in a single object. In order to use tuple we generally add, remove elements. Tuples in Python are immutable, meaning once they are created, their contents cannot be changed directly. However, you can create a new tuple that includes the elements of the original tuple along with the new elements you want to add. Here’s how you can do it: Using Concatenation You can concatenate the original tuple with another tuple containing the new elements.
@ İsmail Baydan
3 minutes read

© 2024 Linux and Python Tutorials

🌱 Powered by Hugo with theme Dream.