Results 1 to 8 of 8

Thread: .

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ... DJ_ToMeKK's Avatar
    Join Date: Feb:2005
    Location:
    Posts: 187

    .

    ,
    .
    :
    " , : 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]

  2. #2
    Mire-x
    Join Date: Apr:2005
    Location: Sofia
    Posts: 763
    .
    (10b) || !(10b)

  3. #3
    ... DJ_ToMeKK's Avatar
    Join Date: Feb:2005
    Location:
    Posts: 187
    , . .
    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]

  4. #4
    XaMaB's Avatar
    Join Date: Nov:2001
    Location:
    Posts: 20,387
    -,
    : XaMaB; . 0.42

    In God we Trust (all others must submit a X.509 certificate). , ()

  5. #5

    Join Date: Apr:2006
    Location:
    Posts: 8,666
    Quote Originally Posted by DJ_ToMeKK View Post
    ,
    .
    1. ?
    2. , , , , ?
    3. Python, PHP? 'wordlist = line.split(): words = len(wordlist)' , ?

  6. #6
    ... DJ_ToMeKK's Avatar
    Join Date: Feb:2005
    Location:
    Posts: 187
    . , . 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]

  7. #7
    Registered User axi's Avatar
    Join Date: Aug:2013
    Location: Sofia
    Posts: 3,638
    , . google .

  8. #8
    Registered User hateras's Avatar
    Join Date: Jan:2011
    Location: Kronos III
    Posts: 1,028
    , ?
    ?
    ASRock B550M Pro 4; Ryzen R5 3600; 2x16 GiB G.SKILL Aegis 3200; 1TB Samsung QVO 960 + 3TB Seagate IronWolf; Zalman Z1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |