Hi there
I have following hash related code in Perl that i need to translate in Python
if ( exists $legs->{$reference} ) {
logg(" 2nd leg of swapes: $ref - merging");
my $swap = merge_swap_legs( $legs->{$ref}, $fields );
$ref = new_fk_ref( $fxall, $ref, $swap );
} else {
$legs->{$ref} = $fields;
logg("1st leg of swap: $ref");
Can anyone help me how i can translate above code into PYTHON?
Waiting for help from some one. Thanks
Regards