DATASCIENCEQ Telegram 1233
In Python, you can unpack sequences using *, to work with a variable number of elements. The * can be placed anywhere and it will collect all the extra elements into a separate variable.

a, b, c = 10, 2, 3      # Standard unpacking

a, *b = 10, 2, 3        # b = [2, 3]

a, *b, c = 10, 2, 3, 4  # b = [2, 3]

*a, b, c = 10, 2, 3, 4  # a = [10, 2]


👉  @DataScience4
Please open Telegram to view this post
VIEW IN TELEGRAM



tgoop.com/DataScienceQ/1233
Create:
Last Update:

In Python, you can unpack sequences using *, to work with a variable number of elements. The * can be placed anywhere and it will collect all the extra elements into a separate variable.

a, b, c = 10, 2, 3      # Standard unpacking

a, *b = 10, 2, 3        # b = [2, 3]

a, *b, c = 10, 2, 3, 4  # b = [2, 3]

*a, b, c = 10, 2, 3, 4  # a = [10, 2]


👉  @DataScience4

BY Python Data Science Jobs & Interviews




Share with your friend now:
tgoop.com/DataScienceQ/1233

View MORE
Open in Telegram


Telegram News

Date: |

Image: Telegram. ‘Ban’ on Telegram End-to-end encryption is an important feature in messaging, as it's the first step in protecting users from surveillance. Earlier, crypto enthusiasts had created a self-described “meme app” dubbed “gm” app wherein users would greet each other with “gm” or “good morning” messages. However, in September 2021, the gm app was down after a hacker reportedly gained access to the user data. 1What is Telegram Channels?
from us


Telegram Python Data Science Jobs & Interviews
FROM American