3
phone_replace.py
source link: https://gist.github.com/kd0g/87f629e29857865f7599049359a67e05
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PangMo5 commented 2 days ago •
edited
제가 파이썬이 주 언어가 아니라 잘 모르긴하는데pnum = pnum.replace('010', '+82 10')
와 같이 replace하면 전체문자열에서 010
이 모두 +82 10
으로 변경되어서
전화 번호가 01001001001
일경우 +82 10+82 10+82 1001
로 변경 되지 않을까여?
뒤에 count를 붙혀줘서 변경 할 횟수를 지정해야될듯합니다.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK