Aller au contenu
View in the app

A better way to browse. Learn more.

Next

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[PYTHON] Variables dynamiques

Featured Replies

Posté(e)

salut à tous,

voila, je voulais savoir si les variables dynamiques existaient avec PYTHON, comme ça existe sous PHP

<?php
$bonjour = 'bonjour';

$bon = 'bon';
echo ${$bon.'jour'};
?>

merci de votre aide :transpi:

Posté(e)

Si, on peut le faire tel quel, il suffit de passer par le dictionnaire globale de variables :

Pour créer une variable myVar avec la valeur 3 :

globals( )[ 'myVar' ] = 3
print myVar

Ensuite rien n'empêche de créer dynamiquement le nom "myVar"...

Posté(e)
  • Auteur

salut,

euh....en fait je débute en python, et j'essayais de transposer un de mes scripts en pythons, mais le seul truc qui me génait c'était ces variables, et comme j'ai pas le niveau encore, je crois que je vais abandonner :roll:

merci quand même :oops:

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.