Alice is commonly used in Python examples (and programming in general) because she comes from the classic cryptography and communication examples, where Alice and Bob are used to represent two parties exchanging messages.

This convention originated in a 1978 paper "A Method for Obtaining Digital Signatures and Public-key Cryptosystems" on public-key cryptography by Ron Rivest, Adi Shamir, and Leonard Adleman (the inventors of RSA encryption).
In Python examples, Alice often appears because:
user1 or personA.You'll often see:
Sometimes Charlie, Eve, and Mallory join the mix—especially when discussing adversaries in security contexts.