간단한 질문이긴 한데요... 'print x,'라는 statement를 루프로 돌리는데... x값을 모두 붙여서 출력하고 싶거든요?
근데 아시다시피 위와 같이 ','를 쓰면 출력할 때마다 자동으로 끝에 공백이 들어가게 됩니다. 공백없이 붙여서 출력하려면 어떻게 해야 될까요...?
print x, 대신에 sys.stdout.write( x ) 이렇게 해보셔요...
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
stdout으로 내보내는 거죠?
print x, 대신에
sys.stdout.write( x ) 이렇게 해보셔요...
댓글 달기