Programming/Python

python - 공백줄 삭제

pental 2020. 3. 15. 17:54
print "".join([s for s in t.strip().splitlines(True) if s.strip()])
저작자표시 비영리 (새창열림)