In PHP like below
<?php
$a = 'b'
$b = 'c'
echo $$a
?>
Output: c
Is there any similar kind of implementation in Python like $$..?
In PHP like below
<?php
$a = 'b'
$b = 'c'
echo $$a
?>
Output: c
Is there any similar kind of implementation in Python like $$..?
no .... not really you can do stuff like
a = 'b'
b = 'c'
globals().getattr(a,None)
or even better use a dict (you should really do this!!!)
env = {'a':5,'b':'a'}
env[env['b']]
but there is nothing like $$a