Skip to content

Instantly share code, notes, and snippets.

View baaratik93's full-sized avatar
🏠
Working from home

Mamadou THIAM baaratik93

🏠
Working from home
View GitHub Profile
@baaratik93
baaratik93 / CustomSplit.py
Last active February 13, 2023 11:02
Une fonction qui récrée la méthode split de python. Elle reçoit une chaine de caractère et un séparateur puis renvoie une liste ou tableau de chaines de caratère.
def CustomSplit(ch,sep):
if ch[-1]==sep:
pass
else:
ch+=sep
ligne=""
std = []
for i in ch:
if i != sep:
ligne+=i