0

Hi there
I am translating PERL code into python and i am new on both language.I have one question if we have hash key reference in PERL like this way
$a->{b}
how we can traslate it into PYTHON?
and if we have this code $a->{$b} , how we translate it into PYTHON also?
Waiting for help. Thanks
Regards
Sarfraz

2
Contributors
2
Replies
5
Views
7 Years
Discussion Span
Last Post by sarfrazashfaq
0
# Hashes/Arrays are known as Libraries in Python:
a = {}
a['b'] = 0
print(a)
print(a['b'])
0
# Hashes/Arrays are known as Libraries in Python:
a = {}
a['b'] = 0
print(a)
print(a['b'])

Thanks friend for guidance....

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.