Deutsch English Français Italiano |
<mailman.53.1711998180.3468.python-list@python.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail From: Avi Gross <avi.e.gross@gmail.com> Newsgroups: comp.lang.python Subject: Re: Multiplication Date: Mon, 1 Apr 2024 15:02:46 -0400 Lines: 43 Message-ID: <mailman.53.1711998180.3468.python-list@python.org> References: <multiplication-20240401093746@ram.dialup.fu-berlin.de> <p49qdk-ea6.ln1@lazy.lzy> <CABaFrRb93X7GLzw41L-Phz9LjtQA_hGiWdFVxjYMhEWxFAHZBw@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de da9Z4nvearQKP9iF5LnKsA2Cvzm9/A26kS327IDyaZbQ== Cancel-Lock: sha1:ZDrbOoaC3lAdkhGclLQiIumYbPo= sha256:5aecq+PNC6xN9Jv0y5vFiqt1cyBmJMfDHTPmpfjqwmY= Return-Path: <avi.e.gross@gmail.com> X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org Authentication-Results: mail.python.org; dkim=pass reason="2048-bit key; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=BI2at/CU; dkim-adsp=pass; dkim-atps=neutral X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pfxlen:0': 0.03; 'python?': 0.03; 'math': 0.05; 'ram': 0.07; 'python.': 0.08; ':-)': 0.09; 'cc:addr:python-list': 0.09; 'email addr:python.org>': 0.09; 'example:': 0.09; '>': 0.14; 'import': 0.15; 'url:mailman': 0.15; 'cc:name:python list': 0.16; 'print(': 0.16; 'received:mail-pf1-x42d.google.com': 0.16; 'symbol': 0.16; 'wrote:': 0.16; 'cc:addr:python.org': 0.20; 'code': 0.23; 'url- ip:188.166.95.178/32': 0.25; 'url-ip:188.166.95/24': 0.25; 'url:listinfo': 0.25; 'cannot': 0.25; 'cc:2**0': 0.25; 'url- ip:188.166/16': 0.25; 'stefan': 0.26; 'email addr:python.org>': 0.28; 'url-ip:188/8': 0.31; 'guess': 0.32; 'python-list': 0.32; 'message-id:@mail.gmail.com': 0.32; 'but': 0.32; 'same': 0.34; 'work.': 0.34; 'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34; 'meaning': 0.35; 'from:addr:gmail.com': 0.35; 'built': 0.36; 'mon,': 0.36; 'two': 0.39; 'everything': 0.63; 'email name:<python-list': 0.84; 'fools.': 0.84; 'largely': 0.91; 'subject:skip:M 10': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711998178; x=1712602978; darn=python.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yq+OaMVRm/8vWbvArry/aB0pb1Q+zRO+7xWrt2vDwTk=; b=BI2at/CUDUV/a6Pk361fd1qy43CYHIWh0rcqvbT9o61/apnnKgnZHSq+0vIEeyqiwZ W3G6x7LzWLiCzdMKOL4opwTSmGt3nAmfi6IFc/d4nwvcLHG69iHrCZgf7nuoUjSX4bt2 x1T251ur92bVjw9DO+Q3tQ8IyTdlu4oJyAhQf9q2t8HBDJPvxa8X7pSJbBacLpkNtz6S U812sndLLzmBsKD0WHUlpVeAcdMp0vVUzfTsDBCjtdoBlZbP8thDMiIxrcXWCkWVaTh7 G+dkRCLNa+BLFozTxVz9/rUp1FcKLyhCDCrIA8t9elqVJWVPzeA4QDmJinOMYVgZY5fK 4jMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711998178; x=1712602978; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yq+OaMVRm/8vWbvArry/aB0pb1Q+zRO+7xWrt2vDwTk=; b=JMNo+6NSWheBCbukBL0tezNG4l4vGfaZWC1cea+6KHu8bFgVGahVXslLYvt5aeNvPp yNaLfOJBgnmQF6gdCunm2+kE9hTISHJ3gpWdhDXLT9bllc0BPIS/53YwD24LmYtOA9V5 bw4LYEf9TuqgZqAlROwmfbo1iVlNLf7qyDkhUK/QsVGa8UARJn08+xzWr7GS+6nMlbsE siZql+mBYig2JiXYWXD2j2JxoKE06ZYLIUy5k9mBhNYmLKCWKq9nQJO34BzflYRHycwX JUHMzT5Z0XLiK6eAsCNnXTFs9nEdKFR7vjlNxlsvk7lj/R2OqhCHHXtQig/tcjEytGSw wqTQ== X-Gm-Message-State: AOJu0YxPtR+pFS0gFEqeI82ERljL1iglk5Bn56wYnTniuJCJXPyje3bd 9tWSiixsuk2+nZHKq//nOI7RtjrJWwzsApthJ9pxnQCNeSXUH1MUvhOvkQppTWPAPxGq/+tj5fP JO0RkMZnzy0G2oEO+eVlWhLkKEKr/noYt X-Google-Smtp-Source: AGHT+IEljQn83+UAUqF6T2uZtZCVnBycv+BVB5iNy8XfqdUDYfxZ4XKfH6WxezwtPrjJqRi/vMYo2FMK+gmy24LR5Tw= X-Received: by 2002:a05:6a20:5482:b0:1a7:c80:be9c with SMTP id i2-20020a056a20548200b001a70c80be9cmr6443883pzk.40.1711998177613; Mon, 01 Apr 2024 12:02:57 -0700 (PDT) In-Reply-To: <p49qdk-ea6.ln1@lazy.lzy> X-Content-Filtered-By: Mailman/MimeDel 2.1.39 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: General discussion list for the Python programming language <python-list.python.org> List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> List-Archive: <https://mail.python.org/pipermail/python-list/> List-Post: <mailto:python-list@python.org> List-Help: <mailto:python-list-request@python.org?subject=help> List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> X-Mailman-Original-Message-ID: <CABaFrRb93X7GLzw41L-Phz9LjtQA_hGiWdFVxjYMhEWxFAHZBw@mail.gmail.com> X-Mailman-Original-References: <multiplication-20240401093746@ram.dialup.fu-berlin.de> <p49qdk-ea6.ln1@lazy.lzy> Bytes: 5906 Is this a April 1 post for fools. Multiplication with an asterisk symbol is built into python. The same symbol used in other contexts has other contexts has an assortment of largely unrelated meanings such as meaning everything when used to import. On Mon, Apr 1, 2024, 1:27=E2=80=AFPM Piergiorgio Sartor via Python-list < python-list@python.org> wrote: > On 01/04/2024 10.40, Stefan Ram wrote: > > Q: How can I multiply two variables in Python? I tried: > > > > a =3D 2 > > b =3D 3 > > print( ab ) > > > > but it did not work. > > > > A: No, this cannot work. To multiply, you need the multiplication > > operator. You can import the multiplication operator from "math": > > > > Code example: > > > > from math import * > > > > a =3D 2 > > b =3D 3 > > print( a * b ) > > I guess the operator "*" can be imported from any module... :-) > > bye, > > -- > > piergiorgio > > -- > https://mail.python.org/mailman/listinfo/python-list >