Sololearn: Learn to Code
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 2
This when it finds o it will print b the same number of times. o = ("o", "b", "b", "o") i = 0 while i < len(o): if o [i] == 'o': print('b') i += 1 https://sololearn.com/compiler-playground/ckmfvhyyDzr7/?ref=app
25th Apr 2024, 12:53 AM
Chris Coder
Chris Coder - avatar
+ 1
If you are referring to Optical Character Recognition, my first bet would be on PyTesseract, a wrapper for the popular Google Tesseract OCR engine (and no, it thankfully does not need an internet connection). I assume you donÔÇÖt actually want to make the OCR engine yourself, just use it in Python?
24th Apr 2024, 12:46 AM
Wilbur Jaywright
Wilbur Jaywright - avatar
+ 1
Does it have to be a tuple and a while loop?
24th Apr 2024, 3:00 AM
Chris Coder
Chris Coder - avatar
+ 1
Valentina JUMP_LINK__&&__Python__&&__JUMP_LINK maybe you would prefer using something else like import re and using findall() https://sololearn.com/compiler-playground/ceX3jbpwcNju/?ref=app
25th Apr 2024, 2:11 AM
BroFar
BroFar - avatar
0
Je ne suis pas s├╗r de ce que ce code est cens├ę faire. Essayez-vous de compter le nombre de fois que la lettre O appara├«t dans une liste ? De plus, cette traduction automatique vous aide-t-elle ?
24th Apr 2024, 1:15 AM
Wilbur Jaywright
Wilbur Jaywright - avatar
25th Apr 2024, 2:31 AM
Chris Coder
Chris Coder - avatar
0
Valentina JUMP_LINK__&&__Python__&&__JUMP_LINK If you likes BroFar example I created something similar with out RegEx. My code uses a simple for loop. To find the string 'o' and display how many times it is found. Updated code: https://sololearn.com/compiler-playground/ckmfvhyyDzr7/?ref=app
25th Apr 2024, 2:46 AM
Chris Coder
Chris Coder - avatar