Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert VBA to Python
#6
ok, here's the minimum:
def clean_text(main_text, cut_1, cut_2) :
    
    while main_text.find(cut_1) != -1 :
        begin = main_text.find(cut_1)
        end = main_text.find(cut_2)
        main_text = main_text[0:begin]+main_text[end+len(cut_2):]
        
    return main_text
Reply


Messages In This Thread
Convert VBA to Python - by uservaf - Sep-13-2019, 03:18 PM
RE: Convert VBA to Python - by ichabod801 - Sep-13-2019, 03:29 PM
RE: Convert VBA to Python - by uservaf - Sep-13-2019, 03:33 PM
RE: Convert VBA to Python - by jefsummers - Sep-13-2019, 08:20 PM
RE: Convert VBA to Python - by uservaf - Sep-13-2019, 09:06 PM
RE: Convert VBA to Python - by jefsummers - Sep-13-2019, 10:13 PM
RE: Convert VBA to Python - by uservaf - Sep-14-2019, 07:06 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020