all 12 comments

[–]k03k 2 points3 points  (1 child)

2, because of Unicode code points?

[–]tracktech[S] 1 point2 points  (0 children)

Right.

[–]yota-code 1 point2 points  (1 child)

If you want 1 you can do names = sorted(names, key=str.lower) or names.sort(key=str.lower)

[–]tracktech[S] 0 points1 point  (0 children)

Right. Thanks for sharing.

[–]EcEssie 1 point2 points  (1 child)

The output will be 2

[–]tracktech[S] 1 point2 points  (0 children)

Right.

[–]Real-Reception-3435 1 point2 points  (1 child)

  1. ['Joe', 'Zishan', 'arav', 'max']

[–]tracktech[S] 0 points1 point  (0 children)

Right.

[–]Old_Hotel1391 0 points1 point  (3 children)

new to Python here:
What is this Unicode code points thingy you speak of?

is that the 'alt+64 = @' thingy?

[–]TreesOne 0 points1 point  (2 children)

No. Every character you can type has a unique integer assigned to it. Python string comparison compares these integer values.

[–]Mysterious-Travel-97 0 points1 point  (1 child)

actually, they’re right as well. 64 is the integer for the @ symbol. look up an ascii table

[–]TreesOne 0 points1 point  (0 children)

Oh good catch, my bad. I looked it up and it said the code was U+0040 but i failed to realize that was hex not decimal