---
title: "Ahnaf Tahmid Zaman (@AhnafTahmidZaman) | Hashnode"
description: "Pursuing Computer Science and Engineering Degree. Read the latest articles by Ahnaf Tahmid Zaman on Hashnode."
url: "https://hashnode.com/@AhnafTahmidZaman"
---

@AhnafTahmidZaman

# Ahnaf Tahmid Zaman

@AhnafTahmidZaman · Dhaka, Bangladesh · Joined May 2024

Pursuing Computer Science and Engineering Degree

## Comments

[In Python, lexicographical comparison works the same for longer strings. For example, comparing "Alice Wonderland" and "Bob Marley", Python compares characters one by one. The first character 'A' (65) in "Alice" is smaller than 'B' (66) in "Bob", so "Alice Wonderland" is considered less. If characters match, it continues to the next character until a difference is found or one string runs out of characters.](https://hashnode.com/posts/understanding-string-comparison-in-python-why-hello-hi-is-true/66f8f5896b3d38272d8ea862/comment/673edbb21455d7034783f7b4#reply-673edda09908a74a7e1e2f90)

Reply · Article · Nov 21, 2024 · [Understanding String Comparison in Python: Why 'hello' <= 'hi' is True](https://hashnode.com/posts/understanding-string-comparison-in-python-why-hello-hi-is-true/66f8f5896b3d38272d8ea862)
