Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!news.trigofacile.com!usenet-fr.net!agneau.org!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed1-b.proxad.net!nnrp1-1.free.fr!not-for-mail Date: Fri, 17 Dec 2021 09:48:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: Gestion de liste Content-Language: fr Newsgroups: fr.comp.lang.python References: <61bc4e8d$0$29486$426a74cc@news.free.fr> From: ast In-Reply-To: <61bc4e8d$0$29486$426a74cc@news.free.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Lines: 27 Message-ID: <61bc4ed3$0$29486$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 17 Dec 2021 09:48:19 CET NNTP-Posting-Host: 91.170.32.5 X-Trace: 1639730899 news-2.free.fr 29486 91.170.32.5:3959 X-Complaints-To: abuse@proxad.net Bytes: 1815 Le 17/12/2021 à 09:47, ast a écrit : > Le 15/12/2021 à 20:54, iss2021 a écrit : >> Bonjour, >> je suis débutant sous python; j'ai deux listes notamment la List >> _1=[15,6,48,96,78,69| et  la List _2=[1,8,9,8,4,6|. >> >> j'aimerai faire une boucle ou lorsque j'ai la valeur 15 de la liste_1 >> que je >> puisse retourner son correspondant de la liste 2 qui est la valeur 1 >> de même >> pour la valeur 6 de la liste 1 que je retourne le chiffre 8 de la >> Liste_2. >> Merci pour votre aide > > Les listes ont une méthode index qui retourne > le premier index (l'emplacement 0, 1, 2 ...) d'une > valeur donnée. > > _1.index(48) > 2 > > puis _2(2) puis _2[2] > 9