lanx@nc10-ubuntu:~$ python Python 2.5.2 (r252:60911, Jan 20 2010, 23:16:55) ... >>> str="123" >>> str+="4" >>> str '1234' #### DB<1> $str="";$t=time;for (1..100000) {$str=$str."a"."b"};print time-$t 13 DB<2> $str="";$t=time;for (1..1000000) {$str.="a";$str.="b"};print time-$t 1 #### >>> for i in range(1, 1000000): ... str+="a"+"b" ... >>> str="" >>> for i in range(1, 100000): ... str=str+"a"+"b" ... #### DB<1> $t=time;for (1..10000000) {$str="";$str.="a"."b";};print time-$t 10 DB<2> $t=time;for (1..10000000) {$str="";$str=$str."a";$str.="b";};print time-$t 17 DB<3> $t=time;for (1..10000000) {$str="";$str=$str."a"."b";};print time-$t 15