Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.lang.python > #3828

Présentation propre d'une interpolation.

Path csiph.com!news.mixmin.net!aioe.org!21JOAjfj9l9MK+tpRyNcKg.user.46.165.242.91.POSTED!not-for-mail
From Dominique <zzz@aol.com.invalid>
Newsgroups fr.comp.lang.python
Subject Présentation propre d'une interpolation.
Date Sun, 1 May 2022 17:37:33 +0200
Organization Aioe.org NNTP Server
Message-ID <t4m9ft$f1g$1@gioia.aioe.org> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Info gioia.aioe.org; logging-data="15408"; posting-host="21JOAjfj9l9MK+tpRyNcKg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1
Content-Language fr
X-Notice Filtered by postfilter v. 0.9.2
Xref csiph.com fr.comp.lang.python:3828

Show key headers only | View raw


Bonjour,

Soit une variable (x et y sont les valeurs à interpoler)

res=['x1 ', 12.456, 'y1 ', 12.96524], ['x ', 13.4587, 'y ', 
13.223527289798024], ['x2 ', 18.6548, 'y2 ', 14.562]

(le tout sur une ligne, bien sûr)

Si j'appelle ma variable, elle se présente (avec Spyder) à peu près 
correctement :

res
Out[73]:
(['x1 ', 12.456, 'y1 ', 12.96524],
  ['x ', 13.4587, 'y ', 13.223527289798024],
  ['x2 ', 18.6548, 'y2 ', 14.562])

Mais si je passe par print, ma variable apparaît sur une seule ligne.

print(res)
(['x1 ', 12.456, 'y1 ', 12.96524], ['x ', 13.4587, 'y ', 
13.223527289798024], ['x2 ', 18.6548, 'y2 ', 14.562])

J'ai alors deux questions. Comment forcer le print à se présenter sur 3 
lignes. Et, crise sur le râteau, comment avoir mes résultats alignés à 
gauche comme suit (si ça passe dans usenet...) :

(['x1 ', 	12.456, 	'y1 ', 	12.96524],
  ['x ', 	13.4587, 	'y ', 	13.223527289798024],
  ['x2 ', 	18.6548, 	'y2 ',	14.562])

En vous remerciant et vous souhaitant une bonne soirée,

Dominique

Back to fr.comp.lang.python | Previous | NextNext in thread | Find similar


Thread

Présentation propre d'une interpolation. Dominique <zzz@aol.com.invalid> - 2022-05-01 17:37 +0200
  Re: Présentation propre d'une interpolation. Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2022-05-01 20:37 +0200
    Re: Présentation propre d'une interpolation. Dominique <zzz@aol.com.invalid> - 2022-05-01 21:45 +0200
      Re: Présentation propre d'une interpolation. Nicolas <nicolasp@aaton.com> - 2022-05-02 09:24 +0200

csiph-web