题解 | #字符串排序#直接调用库函数
字符串排序
https://www.nowcoder.com/practice/d2f088e655d44e4a85c16f7b99126211
//Java版代码 import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] s = sc.next().toCharArray(); Arrays.sort(s); System.out.println(s); } } #Python版代码 print(''.join(sorted(input())))