About 7,630,000 results
Open links in new tab
  1. Python - Star or Asterisk operator ( * ) - GeeksforGeeks

    Apr 25, 2025 · The asterisk (*) operator in Python is a versatile tool used in various contexts. It is commonly used for multiplication, unpacking iterables, defining variable-length arguments in …

  2. Python Variable with Asterisk - Stack Overflow

    Nov 16, 2022 · I need to create a variable with an asterisk. I don't think you do. What you seems to need is to get a list of files by a UNIX-style globbing pattern, so it's a job for glob — Unix …

  3. Understanding the asterisk operator in python when it's before …

    Sep 30, 2021 · One asterisk is being used for ordinary iterables, but when it comes to mappings, you can also use double-asterisk as ** in order to unpack the mapping into keyword …

  4. python - What does ** (double star/asterisk) and * (star/asterisk) …

    Aug 31, 2008 · In Python 3 it is possible to use *l on the left side of an assignment (Extended Iterable Unpacking), though it gives a list instead of a tuple in this context: first, *rest = [1, 2, 3, …

  5. All you need to know about Asterisks in Python : r/Python - Reddit

    May 25, 2022 · It is also useful for assigning a variable using any() (or all) so that you can refer to the exception or match, without calculating it twice. Previously, you'd do if any(thing): foo = …

  6. The Magic of Asterisks in Python - Medium

    Mar 31, 2020 · Asterisk (*) is one of the magic. 1. Magic 1: Packing. We often use print to display objects to the stream file output. If you look at the documentation of the print function, the …

  7. Asterisks in Python: what they are and how to use them - Trey …

    Oct 11, 2018 · Python’s asterisks are powerful. Python’s * and ** operators aren’t just syntactic sugar. Some of the things they allow you to do could be achieved through other means, but …

  8. All you need to know about Asterisks in Python - Bas codes

    May 25, 2022 · But did you know that you can use the asterisks (*) to assign to variables when you have a list of arbitrary length? Say, you want the first element and the last one of a list in a …

  9. Python Single And Double Asterisk described - SourceBae

    Feb 25, 2025 · In Python, the single asterisk (*) is used to unpack iterables, such as lists or tuples, into individual elements. This allows you to pass a variable number of arguments to a function …

  10. Asterisk (*) in Variable Assignment - Learn with Example Code | #Python

    Specifically, we will look at an example code snippet that demonstrates how to assign the first value of a sequence to a variable, and then assign the remaining values to a list using the...

  11. Some results have been removed
Refresh