What does the double arrow => in python means

Viewed 54

I know I saw this => double arrow symbol in python programming but I cannot remember in which context, please advise if possible.

P.S. I only found -> but not => (not sure if it would be the same or there is a difference between them!

Thanks in advance

1 Answers

I have searched and apparently something was stuck in my mind, but apparently not related to python.

In PHP This is referred to as the double arrow operator. It is an assignment operator used in the creation of associative arrays, but we do not have something like this in python.

example:

<?php
$person = array(
    "firstName" => "John",
    "lastName" => "Doe",
    "age" => 28,
    "gender" => "Male",
    "email" => "johndoe@gmail.com",
    "city" => "Germany"
);
?>
Related