Given a file of seemingly meaningless letters called “data.txt”, write a function findPin(inFile) that returns a four-number pin code within file. (All other characters are letters except for the pin code)
I know I'm supposed to open the data file and then iterate through it until I come across a number, but I'm not sure how to go about doing this. The data.txt file is...
loremipsumdolorsitametconsecteturadipiscingelit
seddoeiusmodtemporincididuntutlaboreetdoloremag
naaliquautenimadminimveniamquisnostrudexercitat
ionullamcolaborisnisiutaliquipexeacommodoconseq
uatduisauteiruredolorinrepre7269henderitinvolup
tatevelitessecillumdoloreeufugiatnullapariature
xcepteursintoccaecatcupidatatnonproidentsuntinc
ulpaquiofficiadeseruntmollitanimidestlaborumqwe
So obviously the pin number is 7269, but I need helping getting there. Sorry I'm just a beginner in python and this is really tripping me up.