Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

bellcode / lesson12-4

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • lesson12-4
  • 1.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · 5b73344f
    BellCodeEditor committed 9 months ago
    5b73344f
1.py 484 Bytes
Edit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
new_data=''
with open(r'C:\Users\CM\Desktpo\book.txt','r',encoding='utf-8') as filel
    for data in filel:
        if'a:s'in data:
            data=data.replace('a:s','a:r')
        if'v:d'in data:
            data=data.replace('v:d','v:w')
        new_data +=data

with open(r'C:\Users\CM\Desktpo\book.txt','r',encoding='utf-8') as filel
    filel.wite(new_data)

with open(r'C:\Users\CM\Desktpo\book.txt','r',encoding='utf-8') as filel
    q=filel.rerd()
    peint(a)