Results 1 to 8 of 8
Thread: .
Hybrid View
-
1st May 2014 11:04 #1
.
,
.
:
" , : Perl,PHP,Python
, , if/else, for/while, // (nested) .
, , , , , , . "
, , . 20 ...[Asus B550-F Gaming][R7 5800X][Noctua NH-D15 Chromax.Black][2x16GB DDR4 3200 Corsair Vengeance LPX ][AMD RX 6800XT Reference][Corsair RM1000]
[CORSAIR 4000D iCue][DELL S3220DGF][BenQ RL2755HM]
-
1st May 2014 11:18 #2
-
1st May 2014 12:08 #3
, . .
import sys
def charcount(filepath):
lines=words=chars=0
try:
with open(filepath, 'r') as f:
for line in f:
lines += 1
chars += len(line)
wordlist = line.split():
words = len(wordlist)
return lines, words, chars
except Exception as e:
print(e)
sys.exit(1)
if __name__ -- ' __main__ ':
print(charcount('test.txt'))
, ?[Asus B550-F Gaming][R7 5800X][Noctua NH-D15 Chromax.Black][2x16GB DDR4 3200 Corsair Vengeance LPX ][AMD RX 6800XT Reference][Corsair RM1000]
[CORSAIR 4000D iCue][DELL S3220DGF][BenQ RL2755HM]
-
1st May 2014 12:14 #4
-,
: XaMaB; . 0.42
In God we Trust (all others must submit a X.509 certificate). , ()
-
1st May 2014 12:20 #5
Join Date: Apr:2006
Location:
Posts: 8,666
-
1st May 2014 12:28 #6
. , . Python, . , .
[Asus B550-F Gaming][R7 5800X][Noctua NH-D15 Chromax.Black][2x16GB DDR4 3200 Corsair Vengeance LPX ][AMD RX 6800XT Reference][Corsair RM1000]
[CORSAIR 4000D iCue][DELL S3220DGF][BenQ RL2755HM]
-
1st May 2014 22:14 #7
-
2nd May 2014 18:25 #8
, ?
?ASRock B550M Pro 4; Ryzen R5 3600; 2x16 GiB G.SKILL Aegis 3200; 1TB Samsung QVO 960 + 3TB Seagate IronWolf; Zalman Z1




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in